<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/jsp/manage/common/taglibs.jsp" %>
<script type="text/javascript">
$(function() {
	$.acooly.framework.registerKeydown('manage_entranceGuard_searchform','manage_entranceGuard_datagrid');
});

function manage_entranceGuard_openDoor(number) {
    $.post('/manage/lora/entranceGuard/entranceGuard/openDoor.html', {number:number}, function(r) {
        if(r.success) {
            $.acooly.alert('提示', '操作成功！');
        } else {
            $.acooly.alert('错误', r.message);
        }
    }, 'json');
}

function manage_entranceGuard_readHistoryData() {
    $.post('/manage/lora/entranceGuard/entranceGuard/readHistoryData.html', {}, function(r) {
        if(r.success) {
            $.acooly.alert('提示', '读取成功！');
            $('#manage_entranceGuard_datagrid').datagrid('reload');
        } else {
            $.acooly.alert('错误', r.message);
        }
    }, 'json');
}


</script>
<div class="easyui-layout" data-options="fit : true,border : false">
  <!-- 查询条件 -->
  <div data-options="region:'north',border:false" style="padding:5px; overflow: hidden;" align="left">
    <form id="manage_entranceGuard_searchform" onsubmit="return false">
      <table class="tableForm" width="100%">
        <tr>
          <td align="left">
          	<div>
                    刷卡时间: <input size="15" class="text" id="search_GTE_createTime" name="search_GTE_time" onFocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd'})" />
					至<input size="15" class="text" id="search_LTE_createTime" name="search_LTE_time" onFocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd'})" />
					<%--<#--修改时间: <input size="15" class="text" id="search_GTE_updateTime" name="search_GTE_updateTime" onFocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd'})" />
					至<input size="15" class="text" id="search_LTE_updateTime" name="search_LTE_updateTime" onFocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd'})" />
					刷卡地址: <input type="text" class="text" size="15" name="search_LIKE_address"/>
					卡号: <input type="text" class="text" size="15" name="search_LIKE_cardnum"/>
					部门: <input type="text" class="text" size="15" name="search_LIKE_department"/>
					工号: <input type="text" class="text" size="15" name="search_LIKE_jobnumber"/>
                    姓名: <input type="text" class="text" size="15" name="search_LIKE_name"/>
					&lt;#&ndash;reasonno: <input type="text" class="text" size="15" name="search_LIKE_reasonno"/>
					rec: <input type="text" class="text" size="15" name="search_LIKE_rec"/>&ndash;&gt;
					刷卡状态: <input type="text" class="text" size="15" name="search_LIKE_state"/>
					刷卡时间: <input type="text" class="text" size="15" name="search_LIKE_time"/>
					刷卡方式: <input type="text" class="text" size="15" name="search_LIKE_way"/>-->--%>
          	<a href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:false" onclick="$.acooly.framework.search('manage_entranceGuard_searchform','manage_entranceGuard_datagrid');"><i class="fa fa-search fa-lg fa-fw fa-col"></i>查询</a>
          	</div>
          </td>
        </tr>
      </table>
    </form>
  </div>

  <!-- 列表和工具栏 -->
  <div data-options="region:'center',border:false">
    <table id="manage_entranceGuard_datagrid" class="easyui-datagrid" url="/manage/lora/entranceGuard/entranceGuard/listJson.html" toolbar="#manage_entranceGuard_toolbar" fit="true" border="false" fitColumns="false"
      pagination="true" idField="id" pageSize="20" pageList="[ 10, 20, 30, 40, 50 ]" sortName="id" sortOrder="desc" checkOnSelect="true" selectOnCheck="true" singleSelect="true">
      <thead>
        <tr>
        	<th field="showCheckboxWithId" checkbox="true" data-options="formatter:function(value, row, index){ return row.id }">编号</th>
			<th field="name"> 姓名</th>
            <th field="jobnumber">工号</th>
            <th field="address">刷卡地址</th>
            <th field="cardnum">卡号</th>
			<th field="state">刷卡状态</th>
			<th field="time">刷卡时间</th>
			<th field="way">刷卡方式</th>
            <%--<#--<th field="reasonno">reasonno</th>
            <th field="rec">rec</th>-->
            <#--<th field="id" sortable="true" sum="true">id</th>-->
            <#--<th field="department">部门</th>-->
            <#--<th field="createTime" formatter="dateFormatter">创建时间</th>
            <th field="updateTime" formatter="dateFormatter">修改时间</th>-->
          	<#--<th field="rowActions" data-options="formatter:function(value, row, index){return formatAction('manage_entranceGuard_action',value,row)}">动作</th>-->--%>
        </tr>
      </thead>
    </table>

    <!-- 每行的Action动作模板 -->
    <div id="manage_entranceGuard_action" style="display: none;">
      <a onclick="$.acooly.framework.edit({url:'/manage/demo/entranceGuard/edit.html',id:'{0}',entity:'entranceGuard',width:500,height:500});" href="#" title="编辑"><i class="fa fa-pencil fa-lg fa-fw fa-col"></i></a>
      <a onclick="$.acooly.framework.show('/manage/demo/entranceGuard/show.html?id={0}',500,500);" href="#" title="查看"><i class="fa fa-file-o fa-lg fa-fw fa-col"></i></a>
      <a onclick="$.acooly.framework.remove('/manage/demo/entranceGuard/deleteJson.html','{0}','manage_entranceGuard_datagrid');" href="#" title="删除"><i class="fa fa-trash-o fa-lg fa-fw fa-col"></i></a>
    </div>

    <!-- 表格的工具栏 -->
    <div id="manage_entranceGuard_toolbar">
        <a href="#" class="easyui-linkbutton" plain="true" onclick="manage_entranceGuard_openDoor(1)"><i class="fa fa-sign-out fa-lg fa-fw fa-col"></i>打开玻璃门</a>
        <a href="#" class="easyui-linkbutton" plain="true" onclick="manage_entranceGuard_openDoor(2)"><i class="fa fa-sign-out fa-lg fa-fw fa-col"></i>打开机房大门</a>
        <a href="#" class="easyui-linkbutton" plain="true" onclick="manage_entranceGuard_readHistoryData()"><i class="fa fa-sign-out fa-lg fa-fw fa-col"></i>读取最新数据</a>
      <%--<#--<a href="#" class="easyui-linkbutton" plain="true" onclick="$.acooly.framework.create({url:'/manage/demo/entranceGuard/create.html',entity:'entranceGuard',width:500,height:500})"><i class="fa fa-plus-circle fa-lg fa-fw fa-col"></i>添加</a>
      <a href="#" class="easyui-linkbutton" plain="true" onclick="$.acooly.framework.removes('/manage/demo/entranceGuard/deleteJson.html','manage_entranceGuard_datagrid')"><i class="fa fa-trash-o fa-lg fa-fw fa-col"></i>批量删除</a>
      <a href="#" class="easyui-menubutton" data-options="menu:'#manage_entranceGuard_exports_menu'"><i class="fa fa-arrow-circle-o-down fa-lg fa-fw fa-col"></i>批量导出</a>
      <div id="manage_entranceGuard_exports_menu" style="width:150px;">
        <div onclick="$.acooly.framework.exports('/manage/demo/entranceGuard/exportXls.html','manage_entranceGuard_searchform','门禁刷卡记录表')"><i class="fa fa-file-excel-o fa-lg fa-fw fa-col"></i>Excel</div>
        <div onclick="$.acooly.framework.exports('/manage/demo/entranceGuard/exportCsv.html','manage_entranceGuard_searchform','门禁刷卡记录表')"><i class="fa fa-file-text-o fa-lg fa-fw fa-col"></i>CSV</div>
      </div>
      <a href="#" class="easyui-linkbutton" plain="true" onclick="$.acooly.framework.imports({url:'/manage/demo/entranceGuard/importView.html',uploader:'manage_entranceGuard_import_uploader_file'});"><i class="fa fa-arrow-circle-o-up fa-lg fa-fw fa-col"></i>批量导入</a>-->--%>
    </div>
  </div>

</div>
